cmake_minimum_required(VERSION 3.22)
project(oj_server)

set(CMAKE_CXX_STANDARD 17)

# 添加源文件
add_executable(oj_server
        oj_server.cc
        oj_control.hpp
        oj_model.hpp
        oj_view.hpp
        ../comm/util.hpp
        ../comm/httplib.h
        ../comm/log.hpp
)

# 链接 ctemplate 库
target_link_libraries(oj_server PkgConfig::CTEMPLATE)

# 添加 pthread 库
find_package(Threads REQUIRED)
target_link_libraries(oj_server Threads::Threads)